Integrand size = 21, antiderivative size = 104 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\frac {\sqrt {a+\frac {b}{x}} x}{c}+\frac {2 \sqrt {d} \sqrt {b c-a d} \arctan \left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{c^2}+\frac {(b c-2 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a} c^2} \]
(-2*a*d+b*c)*arctanh((a+b/x)^(1/2)/a^(1/2))/c^2/a^(1/2)+2*arctan(d^(1/2)*( a+b/x)^(1/2)/(-a*d+b*c)^(1/2))*d^(1/2)*(-a*d+b*c)^(1/2)/c^2+x*(a+b/x)^(1/2 )/c
Time = 0.32 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.96 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\frac {c \sqrt {a+\frac {b}{x}} x+2 \sqrt {d} \sqrt {b c-a d} \arctan \left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )+\frac {(b c-2 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}}{c^2} \]
(c*Sqrt[a + b/x]*x + 2*Sqrt[d]*Sqrt[b*c - a*d]*ArcTan[(Sqrt[d]*Sqrt[a + b/ x])/Sqrt[b*c - a*d]] + ((b*c - 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt [a])/c^2
Time = 0.27 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.09, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {899, 110, 27, 174, 73, 218, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx\) |
\(\Big \downarrow \) 899 |
\(\displaystyle -\int \frac {\sqrt {a+\frac {b}{x}} x^2}{c+\frac {d}{x}}d\frac {1}{x}\) |
\(\Big \downarrow \) 110 |
\(\displaystyle \frac {x \sqrt {a+\frac {b}{x}}}{c}-\frac {\int \frac {\left (b c-2 a d-\frac {b d}{x}\right ) x}{2 \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )}d\frac {1}{x}}{c}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {x \sqrt {a+\frac {b}{x}}}{c}-\frac {\int \frac {\left (b c-2 a d-\frac {b d}{x}\right ) x}{\sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )}d\frac {1}{x}}{2 c}\) |
\(\Big \downarrow \) 174 |
\(\displaystyle \frac {x \sqrt {a+\frac {b}{x}}}{c}-\frac {\frac {(b c-2 a d) \int \frac {x}{\sqrt {a+\frac {b}{x}}}d\frac {1}{x}}{c}-\frac {2 d (b c-a d) \int \frac {1}{\sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )}d\frac {1}{x}}{c}}{2 c}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {x \sqrt {a+\frac {b}{x}}}{c}-\frac {\frac {2 (b c-2 a d) \int \frac {1}{\frac {1}{b x^2}-\frac {a}{b}}d\sqrt {a+\frac {b}{x}}}{b c}-\frac {4 d (b c-a d) \int \frac {1}{c-\frac {a d}{b}+\frac {d}{b x^2}}d\sqrt {a+\frac {b}{x}}}{b c}}{2 c}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {x \sqrt {a+\frac {b}{x}}}{c}-\frac {\frac {2 (b c-2 a d) \int \frac {1}{\frac {1}{b x^2}-\frac {a}{b}}d\sqrt {a+\frac {b}{x}}}{b c}-\frac {4 \sqrt {d} \sqrt {b c-a d} \arctan \left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{c}}{2 c}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {x \sqrt {a+\frac {b}{x}}}{c}-\frac {-\frac {4 \sqrt {d} \sqrt {b c-a d} \arctan \left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{c}-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right ) (b c-2 a d)}{\sqrt {a} c}}{2 c}\) |
(Sqrt[a + b/x]*x)/c - ((-4*Sqrt[d]*Sqrt[b*c - a*d]*ArcTan[(Sqrt[d]*Sqrt[a + b/x])/Sqrt[b*c - a*d]])/c - (2*(b*c - 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[ a]])/(Sqrt[a]*c))/(2*c)
3.3.28.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[(a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/((m + 1)*(b*e - a*f))), x] - Simp[1/((m + 1)*(b*e - a*f)) Int[(a + b*x)^(m + 1) *(c + d*x)^(n - 1)*(e + f*x)^p*Simp[d*e*n + c*f*(m + p + 2) + d*f*(m + n + p + 2)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && Gt Q[n, 0] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p] || IntegersQ[p, m + n])
Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* ((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d) Int[(e + f*x)^ p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d) Int[(e + f*x)^p/(c + d *x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol ] :> -Subst[Int[(a + b/x^n)^p*((c + d/x^n)^q/x^2), x], x, 1/x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(231\) vs. \(2(86)=172\).
Time = 0.22 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.23
method | result | size |
risch | \(\frac {x \sqrt {\frac {a x +b}{x}}}{c}-\frac {\left (\frac {\left (2 a d -b c \right ) \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right )}{c \sqrt {a}}+\frac {2 \left (a d -b c \right ) d \ln \left (\frac {\frac {2 \left (a d -b c \right ) d}{c^{2}}-\frac {\left (2 a d -b c \right ) \left (x +\frac {d}{c}\right )}{c}+2 \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, \sqrt {a \left (x +\frac {d}{c}\right )^{2}-\frac {\left (2 a d -b c \right ) \left (x +\frac {d}{c}\right )}{c}+\frac {\left (a d -b c \right ) d}{c^{2}}}}{x +\frac {d}{c}}\right )}{c^{2} \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}}\right ) \sqrt {\frac {a x +b}{x}}\, \sqrt {x \left (a x +b \right )}}{2 c \left (a x +b \right )}\) | \(232\) |
default | \(-\frac {\sqrt {\frac {a x +b}{x}}\, x \left (2 a^{\frac {3}{2}} \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, c -2 a d x +b c x -b d}{c x +d}\right ) d^{2}-2 \sqrt {x \left (a x +b \right )}\, c^{2} \sqrt {a}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}-2 \sqrt {a}\, \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, c -2 a d x +b c x -b d}{c x +d}\right ) b c d +2 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, a c d -\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}\, b \,c^{2}\right )}{2 \sqrt {x \left (a x +b \right )}\, c^{3} \sqrt {a}\, \sqrt {\frac {\left (a d -b c \right ) d}{c^{2}}}}\) | \(287\) |
1/c*x*((a*x+b)/x)^(1/2)-1/2/c*((2*a*d-b*c)/c*ln((1/2*b+a*x)/a^(1/2)+(a*x^2 +b*x)^(1/2))/a^(1/2)+2*(a*d-b*c)*d/c^2/((a*d-b*c)*d/c^2)^(1/2)*ln((2*(a*d- b*c)*d/c^2-(2*a*d-b*c)/c*(x+d/c)+2*((a*d-b*c)*d/c^2)^(1/2)*(a*(x+d/c)^2-(2 *a*d-b*c)/c*(x+d/c)+(a*d-b*c)*d/c^2)^(1/2))/(x+d/c)))*((a*x+b)/x)^(1/2)*(x *(a*x+b))^(1/2)/(a*x+b)
Time = 0.28 (sec) , antiderivative size = 482, normalized size of antiderivative = 4.63 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\left [\frac {2 \, a c x \sqrt {\frac {a x + b}{x}} - {\left (b c - 2 \, a d\right )} \sqrt {a} \log \left (2 \, a x - 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + 2 \, \sqrt {-b c d + a d^{2}} a \log \left (\frac {b d - {\left (b c - 2 \, a d\right )} x + 2 \, \sqrt {-b c d + a d^{2}} x \sqrt {\frac {a x + b}{x}}}{c x + d}\right )}{2 \, a c^{2}}, \frac {2 \, a c x \sqrt {\frac {a x + b}{x}} - 4 \, \sqrt {b c d - a d^{2}} a \arctan \left (\frac {\sqrt {b c d - a d^{2}} x \sqrt {\frac {a x + b}{x}}}{a d x + b d}\right ) - {\left (b c - 2 \, a d\right )} \sqrt {a} \log \left (2 \, a x - 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right )}{2 \, a c^{2}}, \frac {a c x \sqrt {\frac {a x + b}{x}} - {\left (b c - 2 \, a d\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) + \sqrt {-b c d + a d^{2}} a \log \left (\frac {b d - {\left (b c - 2 \, a d\right )} x + 2 \, \sqrt {-b c d + a d^{2}} x \sqrt {\frac {a x + b}{x}}}{c x + d}\right )}{a c^{2}}, \frac {a c x \sqrt {\frac {a x + b}{x}} - 2 \, \sqrt {b c d - a d^{2}} a \arctan \left (\frac {\sqrt {b c d - a d^{2}} x \sqrt {\frac {a x + b}{x}}}{a d x + b d}\right ) - {\left (b c - 2 \, a d\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right )}{a c^{2}}\right ] \]
[1/2*(2*a*c*x*sqrt((a*x + b)/x) - (b*c - 2*a*d)*sqrt(a)*log(2*a*x - 2*sqrt (a)*x*sqrt((a*x + b)/x) + b) + 2*sqrt(-b*c*d + a*d^2)*a*log((b*d - (b*c - 2*a*d)*x + 2*sqrt(-b*c*d + a*d^2)*x*sqrt((a*x + b)/x))/(c*x + d)))/(a*c^2) , 1/2*(2*a*c*x*sqrt((a*x + b)/x) - 4*sqrt(b*c*d - a*d^2)*a*arctan(sqrt(b*c *d - a*d^2)*x*sqrt((a*x + b)/x)/(a*d*x + b*d)) - (b*c - 2*a*d)*sqrt(a)*log (2*a*x - 2*sqrt(a)*x*sqrt((a*x + b)/x) + b))/(a*c^2), (a*c*x*sqrt((a*x + b )/x) - (b*c - 2*a*d)*sqrt(-a)*arctan(sqrt(-a)*sqrt((a*x + b)/x)/a) + sqrt( -b*c*d + a*d^2)*a*log((b*d - (b*c - 2*a*d)*x + 2*sqrt(-b*c*d + a*d^2)*x*sq rt((a*x + b)/x))/(c*x + d)))/(a*c^2), (a*c*x*sqrt((a*x + b)/x) - 2*sqrt(b* c*d - a*d^2)*a*arctan(sqrt(b*c*d - a*d^2)*x*sqrt((a*x + b)/x)/(a*d*x + b*d )) - (b*c - 2*a*d)*sqrt(-a)*arctan(sqrt(-a)*sqrt((a*x + b)/x)/a))/(a*c^2)]
\[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\int \frac {x \sqrt {a + \frac {b}{x}}}{c x + d}\, dx \]
\[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\int { \frac {\sqrt {a + \frac {b}{x}}}{c + \frac {d}{x}} \,d x } \]
Exception generated. \[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
Time = 5.74 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.43 \[ \int \frac {\sqrt {a+\frac {b}{x}}}{c+\frac {d}{x}} \, dx=\frac {x\,\sqrt {a+\frac {b}{x}}}{c}+\frac {\ln \left (\sqrt {a+\frac {b}{x}}-\sqrt {a}\right )\,\left (a\,d-\frac {b\,c}{2}\right )}{\sqrt {a}\,c^2}-\frac {\ln \left (\sqrt {a+\frac {b}{x}}+\sqrt {a}\right )\,\left (2\,a\,d-b\,c\right )}{2\,\sqrt {a}\,c^2}-\frac {\mathrm {atan}\left (\frac {b^4\,d^3\,\sqrt {a+\frac {b}{x}}\,\sqrt {a\,d^2-b\,c\,d}\,4{}\mathrm {i}}{4\,a\,b^4\,d^4-4\,b^5\,c\,d^3}\right )\,\sqrt {a\,d^2-b\,c\,d}\,2{}\mathrm {i}}{c^2} \]